package com.itcast.demo.validate.pojo;

import lombok.Data;
import lombok.ToString;

/**
 * @author SuQianLong
 */
@Data
@ToString
public class ApiError<T> {
    private String message;
    private String errorCode;
    private T data;

    public ApiError(String message, String errorCode) {
        this.message = message;
        this.errorCode = errorCode;
    }

    public ApiError(String message, String errorCode, T data) {
        this.message = message;
        this.errorCode = errorCode;
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}